package com.kantboot.business.shop.repository;

import com.kantboot.business.shop.domain.vo.BusShopGoodsTypeHasChildren;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface BusShopGoodsTypeHasChildrenRepository extends JpaRepository<BusShopGoodsTypeHasChildren, Long> {

    @Query("""
            FROM BusShopGoodsTypeHasChildren
            WHERE parentId IS NULL
            ORDER BY priority DESC
            """)
    List<BusShopGoodsTypeHasChildren> getAll();

}
